package org.example.system.model.form;


import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.example.system.validator.Group;
import org.springframework.web.multipart.MultipartFile;

@Schema(description = "租户表单对象")
@Data
public class TenantForm {

    @NotBlank(groups = {Group.Edit.class}, message = "编号不能为空")
    @Schema(description = "租户id")
    private Integer id;

    @Schema(description = "用户昵称")
    private String nickName;

    @Schema(description = "微信用户openid")
    private String openId;

    @Schema(description = "用户头像")
    private String avatarUrl;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "真实姓名")
    private String name;

    @Pattern(regexp = "^\\d{17}[\\dXx]$", message = "身份证号格式不正确")
    @Schema(description = "身份证号")
    private String idNo;


    @Schema(description = "驾驶证图片地址")
    private String drivingCert;

    @Schema(description = "0:未认证 1:认证成功 2:认证失败")
    private Integer status;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "头像上传对象")
    private MultipartFile avatarFile;

    @Schema(description = "驾驶证上传对象")
    private MultipartFile drivingCertFile;

    @Schema(description = "登录凭证 Token")
    private String accessToken;
}
